package com.example.demo.component.proxy.cglib.lazy;

/**
 * @ClassName Main
 * @Description
 * @date 2023/4/6 14:27
 * @Author yanceysong
 * @Version 1.0
 */
public class Main {
    public static void main(String[] args) {
        LoaderBean loader = new LoaderBean();
        System.out.println(loader.getLoaderName());
        System.out.println(loader.getLoaderValue());
        PropertyBean propertyBean = loader.getPropertyBean();//访问延迟加载对象
        System.out.println(propertyBean.getPropertyName());
        System.out.println(propertyBean.getPropertyValue());
        System.out.println("after...");
        //当再次访问延迟加载对象时,就不会再执行回调了
        System.out.println(propertyBean.getPropertyName());
    }
}
